package mlz.b_dateClass;

import java.util.Date;
import java.util.Timer;

//Date类型
public class DateClassDemo02 {
    public static void main(String[] args) {
        Date date = new Date();
        //Sun Oct 06 13:46:33 CST 2024
        System.out.println(date);

        //Thu Jan 01 08:00:00 CST 1970
        Date date1 = new Date(0l);
        System.out.println(date1);

        //Sun Oct 06 13:35:04 CST 2024    long -> Date
        Date date2 = new Date(1728192904727L);
        System.out.println(date2);


        /* 常用API*/
        //Date -> long
        long time = date.getTime();
        //long -> date
        date.setTime(time);

        






    }
}
